﻿Namespace XmlRpc
    <Serializable()>
    Public NotInheritable Class SearchResultColumns

        Private Sub New()

        End Sub

        Public Shared Function FromEntityColumns(order As Entities.SearchResultsColumns) As String()
            Dim retval = New List(Of String) From {"nb_results"}
            If (order And Entities.SearchResultsColumns.AffiliationLink) > 0 Then
                retval.Add(SearchResultColumns.AffiliationLink)
            End If
            If (order And Entities.SearchResultsColumns.AvailableForSubscription) > 0 Then
                retval.Add(SearchResultColumns.AvailableForSubscription)
            End If
            If (order And Entities.SearchResultsColumns.ConceptualCategory) > 0 Then
                retval.Add(SearchResultColumns.Cat2)
            End If
            If (order And Entities.SearchResultsColumns.ConceptualCategoryHierarchy) > 0 Then
                retval.Add(SearchResultColumns.Cat2Hierarchy)
            End If
            If (order And Entities.SearchResultsColumns.CreationDate) > 0 Then
                retval.Add(SearchResultColumns.CreationDate)
            End If
            If (order And Entities.SearchResultsColumns.CreatorId) > 0 Then
                retval.Add(SearchResultColumns.CreatorId)
            End If
            If (order And Entities.SearchResultsColumns.CreatorName) > 0 Then
                retval.Add(SearchResultColumns.CreatorName)
            End If
            If (order And Entities.SearchResultsColumns.FlvUrl) > 0 Then
                retval.Add(SearchResultColumns.FlvUrl)
            End If
            If (order And Entities.SearchResultsColumns.Id) > 0 Then
                retval.Add(SearchResultColumns.Id)
            End If
            If (order And Entities.SearchResultsColumns.Keywords) > 0 Then
                retval.Add(SearchResultColumns.Keywords)
            End If
            If (order And Entities.SearchResultsColumns.Licenses) > 0 Then
                retval.Add(SearchResultColumns.Licenses)
            End If
            If (order And Entities.SearchResultsColumns.MediaTypeId) > 0 Then
                retval.Add(SearchResultColumns.MediaTypeId)
            End If
            If (order And Entities.SearchResultsColumns.NumberDownloads) > 0 Then
                retval.Add(SearchResultColumns.NbDownloads)
            End If
            If (order And Entities.SearchResultsColumns.NumberViews) > 0 Then
                retval.Add(SearchResultColumns.NbViews)
            End If
            If (order And Entities.SearchResultsColumns.RepresentiveCategory) > 0 Then
                retval.Add(SearchResultColumns.Cat1)
            End If
            If (order And Entities.SearchResultsColumns.RepresentiveCategoryHierarchy) > 0 Then
                retval.Add(SearchResultColumns.Cat1Hierarchy)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail110Height) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail110Height)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail110Url) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail110Url)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail110Width) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail110Width)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail30Height) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail30Height)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail30Url) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail30Url)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail30Width) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail30Width)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail400Height) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail400Height)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail400Url) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail400Url)
            End If
            If (order And Entities.SearchResultsColumns.Thumbnail400Width) > 0 Then
                retval.Add(SearchResultColumns.Thumbnail400Width)
            End If
            If (order And Entities.SearchResultsColumns.ThumbnailHeight) > 0 Then
                retval.Add(SearchResultColumns.ThumbnailHeight)
            End If
            If (order And Entities.SearchResultsColumns.ThumbnailHtmlTag) > 0 Then
                retval.Add(SearchResultColumns.ThumbnailHtmlTag)
            End If
            If (order And Entities.SearchResultsColumns.ThumbnailUrl) > 0 Then
                retval.Add(SearchResultColumns.ThumbnailUrl)
            End If
            If (order And Entities.SearchResultsColumns.ThumbnailWidth) > 0 Then
                retval.Add(SearchResultColumns.ThumbnailWidth)
            End If
            If (order And Entities.SearchResultsColumns.Title) > 0 Then
                retval.Add(SearchResultColumns.Title)
            End If
            Return retval.ToArray()
        End Function

        Public Shared ReadOnly Property NbResults As String
            Get
                Return "nb_results"
            End Get
        End Property

        Public Shared ReadOnly Property Id As String
            Get
                Return "id"
            End Get
        End Property

        Public Shared ReadOnly Property Title As String
            Get
                Return "title"
            End Get
        End Property

        Public Shared ReadOnly Property CreatorName As String
            Get
                Return "creator_name"
            End Get
        End Property

        Public Shared ReadOnly Property CreatorId As String
            Get
                Return "creator_id"
            End Get
        End Property

        Public Shared ReadOnly Property ThumbnailUrl As String
            Get
                Return "thumbnail_url"
            End Get
        End Property

        Public Shared ReadOnly Property ThumbnailHtmlTag As String
            Get
                Return "thumbnail_html_tag"
            End Get
        End Property

        Public Shared ReadOnly Property ThumbnailWidth As String
            Get
                Return "thumbnail_width"
            End Get
        End Property

        Public Shared ReadOnly Property ThumbnailHeight As String
            Get
                Return "thumbnail_height"
            End Get
        End Property

        Public Shared ReadOnly Property AffiliationLink As String
            Get
                Return "affiliation_link"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail30Url As String
            Get
                Return "thumbnail_30_url"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail30Width As String
            Get
                Return "thumbnail_30_width"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail30Height As String
            Get
                Return "thumbnail_30_height"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail110Url As String
            Get
                Return "thumbnail_110_url"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail110Width As String
            Get
                Return "thumbnail_110_width"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail110Height As String
            Get
                Return "thumbnail_110_height"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail400Url As String
            Get
                Return "thumbnail_400_url"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail400Width As String
            Get
                Return "thumbnail_400_width"
            End Get
        End Property

        Public Shared ReadOnly Property Thumbnail400Height As String
            Get
                Return "thumbnail_400_height"
            End Get
        End Property

        Public Shared ReadOnly Property FlvUrl As String
            Get
                Return "flv_url"
            End Get
        End Property

        Public Shared ReadOnly Property MediaTypeId As String
            Get
                Return "media_type_id"
            End Get
        End Property

        Public Shared ReadOnly Property Cat1 As String
            Get
                Return "cat1"
            End Get
        End Property

        Public Shared ReadOnly Property Cat1Hierarchy As String
            Get
                Return "cat1_hierarchy"
            End Get
        End Property

        Public Shared ReadOnly Property Cat2 As String
            Get
                Return "cat2"
            End Get
        End Property

        Public Shared ReadOnly Property Cat2Hierarchy As String
            Get
                Return "cat2_hierarchy"
            End Get
        End Property

        Public Shared ReadOnly Property NbViews As String
            Get
                Return "nb_views"
            End Get
        End Property

        Public Shared ReadOnly Property NbDownloads As String
            Get
                Return "nb_downloads"
            End Get
        End Property

        Public Shared ReadOnly Property CreationDate As String
            Get
                Return "creation_date"
            End Get
        End Property

        Public Shared ReadOnly Property Keywords As String
            Get
                Return "keywords"
            End Get
        End Property

        Public Shared ReadOnly Property Licenses As String
            Get
                Return "licenses"
            End Get
        End Property

        Public Shared ReadOnly Property AvailableForSubscription As String
            Get
                Return "available_for_subscription"
            End Get
        End Property

    End Class
End Namespace

